import request from '@/utils/request'
import axios from '@/utils/axios.js'
// 登录方法
export const login = (username, password, code, uuid) => {
    const data = {
        username,
        password,
        code,
        uuid
    }
    return axios({
        url: '/login',
        method: 'post',
        data: data,
        mock: true
    })
}

// 注册方法
export const register = data => {
    return axios({
        url: '/register',
        headers: {
            isToken: false
        },
        method: 'post',
        data: data
    })
}

// 获取用户详细信息
export const getInfo = () => {
    return axios({
        url: '/getInfo',
        method: 'get',
        mock: true
    })
}

// 退出方法
export const logout = () => {
    return axios({
        url: '/logout',
        method: 'post',
        mock: true
    })
}
